package com.zs.demo.controller.system;

import com.baomidou.mybatisplus.plugins.Page;
import com.zs.demo.pojo.dto.system.log.FindLogDTO;
import com.zs.demo.pojo.entity.system.SysLog;
import com.zs.demo.service.system.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/* @Desc: 系统日志控制器
 * @author:zhengs  
 * @Time: 2018/11/20 11:24
 * @Copyright: © zhengs 版权所有  
 * @Warning: 本内容仅限于本公司内部传阅,禁止外泄或用于其它商业目的
 */
@RestController
@RequestMapping(value = "/system/log")
@Api(tags = {"日志管理"})
public class LogController{

    @Autowired
    private SysLogService sysLogService;

    @PostMapping("/list")
    @ApiOperation(value = "分页获取所有列表")
    @ApiImplicitParam(paramType = "header",name = "Authorization",value = "身份认证Token",required = true)
    public Page<SysLog> list(@RequestBody FindLogDTO findDTO){
        return sysLogService.list(findDTO);
    }
}
